from openai import OpenAI

if __name__ == "__main__":
    client = OpenAI()

    response = client.responses.create(
        model="ft:gpt-4o-mini-2024-07-18:starmax-technology::BHvJ8VUY",
        #model="gpt-4o-mini",
        input=[
            {"role": "system",
             "content": "你是一名睡眠科学专家，擅长从可穿戴设备数据中解读睡眠质量，能结合睡眠医学理论与用户行为模式提供针对性建议。"},
            {"role": "user",
             "content": '''
             "女性 50岁
12/10 2320-0710 D110 S215 R80 A25
12/11 0015-0800 D095 S230 R70 A35
12/12 2250-0640 D125 S200 R95 A20
12/13 2330-0725 D105 S240 R75 A30
12/14 2245-0630 D130 S195 R100 A15
11/15 2310-0715 D115 S220 R85 A25
D=深睡(min) / S=浅睡(min)
R=REM(min) / A=清醒(min)
时间采用24小时制简写（如2320=23:20）"
             '''},
        ]
    )

    print(response.output_text)